package com.example.trafficexam2.fragment;

import android.os.Bundle;
import android.support.annotation.NonNull;
import android.support.annotation.Nullable;
import android.support.v4.app.Fragment;
import android.util.Log;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;

import com.example.trafficexam2.R;
import com.example.trafficexam2.bean.Account;
import com.example.trafficexam2.dao.AccountDao;

import java.util.Collections;
import java.util.List;

/**
 * Created by Administrator on 2018/11/22/022.
 */

public class BillFragment extends Fragment {
    View view;
    @Nullable
    @Override
    public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
        view = inflater.inflate(R.layout.bill_fragment,container,false);
        AccountDao accountDao = new AccountDao(getContext());
        List<Account> rechargemoney = accountDao.queryByUsername("admin");
        Log.e("dsa", "onCreateView: "+rechargemoney.toString());
        Collections.reverse(rechargemoney);
        for (int i =0;i<rechargemoney.size();i++){
            rechargemoney.get(i).getRechargedate();
            Log.e("dsa", "onCreateView: "+rechargemoney.get(i).getCarid());
        }
        return view;
    }
}
